#include <stdio.h>
#include <REGX52.H>
#include "Delay.h"
#include "LED88.h"

unsigned char Time=0,k=0,column=0,count=0,scan=0,ii=0;

unsigned int code Image[]={
	0x0E,0x8F,0xC3,0xD8,0xD8,0xC3,0x8F,0x0E,
	0x7E,0x3C,0x00,0x18,0xDB,0xC3,0xE7,0x66,
	0x70,0xF1,0xC3,0x1B,0x1B,0xC3,0xF1,0x70,
	0x66,0xE7,0xC3,0xDB,0x18,0x00,0x3C,0x7E
};

void Delay(unsigned char t)
{
	while(t--);
}

int main(void)
{
	P2=0xFF;
	while(1)
	{
		for(ii=0;ii<=2;ii++)
		{
			while(count<32)
			{
				for(scan=0;scan<10;scan++)
				{
					for(column=0;column<8;column++)
					{
						LED_Show(column,Image[column+count]);
					}
				}
			count+=8;
			}
		count=0;
		}
		for(Time=0;Time<100;Time++)
		{
			for(k=0;k<20;k++)
			{
				P2=0xFF;
				P2_5=1;
				Delay(Time);
				P2=0x00;
				P2_5=1;
				Delay(100-Time);
			}
		}
		for(Time=0;Time<100;Time++)
		{
			for(k=0;k<20;k++)
			{
				P2=0xFF;
				P2_5=1;
				Delay(100-Time);
				P2=0x00;
				P2_5=1;
				Delay(Time);
			}
		}
	}
}
